// pages/select/index.js
Page({
    /**
     * 页面的初始数据
     */
    data: {
        imageArr:[
            'https://wx1.sbimg.cn/2020/08/20/3UAeh.png',
            'https://wx1.sbimg.cn/2020/08/20/3ipVT.jpg',
            'https://wx1.sbimg.cn/2020/08/20/3iCll.jpg',
            'https://wx1.sbimg.cn/2020/08/20/3i09w.jpg'
        ]
    },
    onSelect(event) {
        const row = this.data.row
        const col = this.data.col
        const idx = event.currentTarget.dataset.idx
        const bgImage = this.data.imageArr[idx]
        wx.reLaunch({
            url: '/pages/picture-puzzle/index?col=' + col + '&row=' + row+'&bgImage='+bgImage,
        })
    },
    onLoad(options) {
        this.setData({
            row: options.row,
            col: options.col
        })
    }
})
